<?php

namespace mbilling\BillingBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class BonusesTableForm extends AbstractType
{
    protected $users;
    protected $bonuses;
    
    public function __construct($users, $bonuses)
    {
        $this->users = $users;
        $this->bonuses = $bonuses;
    }
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder->add('user_id', 'choice', array('choices' => $this->users));
        $builder->add('bonus_id', 'choice', array('choices' => $this->bonuses));
        $builder->add('is_active', 'checkbox', array('required' => false));
    }
}